/**
 * Generali Solutions d'assurances - Tous droits réservés &copy; 2007 - 2010
 */

package fr.generali.accueilclient.opt.detaildossier.builder;

import fr.generali.accueilclient.opt.detaildossier.om.IMotifsDetailDossier;
import fr.generali.accueilclient.opt.detaildossier.om.impl.DTOMotifsDetailDossier;

/**
 * @author Holmes Kelly
 */
public class DTOMotifsDetailDossierBuilder extends DTOMotifsDetailDossierBuilderBase<DTOMotifsDetailDossierBuilder> {

    /**
     * constructeur
     */
    public DTOMotifsDetailDossierBuilder() {
        super(new DTOMotifsDetailDossier());
    }

    /**
     * @return DTOMotifsDetailDossierBuilder
     */
    public static DTOMotifsDetailDossierBuilder dTOMotifsDetailDossier() {
        return new DTOMotifsDetailDossierBuilder();
    }

    /**
     * @return instance
     */
    public IMotifsDetailDossier build() {
        return getInstance();
    }
}

/**
 * @author Holmes Kelly
 * @param <GeneratorT>
 */
class DTOMotifsDetailDossierBuilderBase<GeneratorT extends DTOMotifsDetailDossierBuilderBase<GeneratorT>> {

    /**
     * instance
     */
    private IMotifsDetailDossier instance;

    /**
     * @param aInstance instance
     */
    protected DTOMotifsDetailDossierBuilderBase(IMotifsDetailDossier aInstance) {
        instance = aInstance;
    }

    /**
     * @return instance
     */
    protected IMotifsDetailDossier getInstance() {
        return instance;
    }

    /**
     * @param aValue identifiant
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildIdentifiant(String aValue) {
        instance.setIdentifiant(aValue);

        return (GeneratorT ) this;
    }
}
